
#ifndef _BSP_UART_2_H__
#define _BSP_UART_2_H__

#include <stdint.h>

void BSP_Uart_Init(uint8_t id);
void BSP_Uart_Deinit(uint8_t id);

void BSP_Uart_TxRxConfig(uint8_t id, uint8_t txrx, uint8_t cfg);

void BSP_Uart_SetBaud(uint8_t id, uint32_t baud);
void BSP_Uart_SetRxCallback(uint8_t id, void(*cb)(uint16_t rx));
void BSP_Uart_Send(uint8_t id, uint8_t tx);
void BSP_Uart_SendBuf(uint8_t id, const uint8_t buf[], uint32_t len);

void BSP_Uart_DMA_Init(void);

void BSP_Uart_DMA_ReceiveInit(uint8_t id, uint8_t* dma_buf, uint32_t size, void (*dma_rx_cb)(uint8_t* data, uint32_t size));

void BSP_Uart_DMA_Send(uint8_t id, void* buf, uint32_t size, uint8_t flag, void(*tx_cb)(uint8_t flag));

int BSP_Uart_DMA_IsSendComplete(uint8_t id);


#endif

